<!DOCTYPE html >
<html lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>在线收款系统管理中心</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="/static/css/font.css">
    <link rel="stylesheet" href="/static/css/xadmin.css">
    <script type="text/javascript" charset="utf-8" src="/static/js/jquery-1.11.3.min.js"></script>
    <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/js/xadmin.js"></script>
</head>
<body>
<div class="x-body">
    <blockquote class="layui-elem-quote">欢迎使用PaySystem聚合支付系统!</blockquote>
    <fieldset class="layui-elem-field">
        <legend>信息统计</legend>
        <div class="layui-field-box">
            <table class="layui-table" lay-even style="text-align: center;">
                <thead>
                <tr style="text-align: center;">
                    <th style="text-align: center;">用户数</th>
                    <th style="text-align: center;">订单数 &nbsp;
                        <a href="javascript:void(0);" style="color: green;font-size: 16px;"
                           onclick="member_del()">清理</a>
                    </th>
                    <th style="text-align: center;">已支付</th>
                    <th style="text-align: center;">已退款</th>
                    <th style="text-align: center;">未支付</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td th:text="${usercount}"></td>
                    <td th:text="${ordercount1}"></td>
                    <td th:text="${ordercount2}"></td>
                    <td th:text="${ordercount4}"></td>
                    <td th:text="${ordercount3}"></td>
                </tr>
                <tr>
                    <td>今日</td>
                    <td th:text="'支付宝:'+${today_alipay}+'元'"></td>
                    <td th:text="'微信:'+${today_wxpay}+'元'"></td>
                    <td th:text="'QQ钱包:'+${today_qqpay}+'元'"></td>
                    <td th:text="'合计:'+${today_all}+'元'"></td>
                </tr>
                <tr>
                    <td>昨日</td>
                    <td th:text="'支付宝:'+${today_alipay2}+'元'"></td>
                    <td th:text="'微信:'+${today_wxpay2}+'元'"></td>
                    <td th:text="'QQ钱包:'+${today_qqpay2}+'元'"></td>
                    <td th:text="'合计:'+${today_all2}+'元'"></td>
                </tr>
                <tr>
                    <td>全部</td>
                    <td th:text="'支付宝:'+${alipay}+'元'"></td>
                    <td th:text="'微信:'+${wxpay}+'元'"></td>
                    <td th:text="'QQ钱包:'+${qqpay}+'元'"></td>
                    <td th:text="'合计:'+${all}+'元'"></td>
                </tr>
                </tbody>
            </table>
            <table class="layui-table">
                <thead>
                <tr>
                    <th colspan="2" scope="col">服务器信息</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>系统版本:</td>
                    <td th:text="${sys_version}"></td>
                </tr>
                <tr>
                    <td>授权状态:</td>
                    <td th:switch="${auth_status}">
                        <th:block th:case="true">已授权</th:block>
                        <th:block th:case="false">未授权</th:block>
                    </td>
                </tr>
                <tr>
                    <td>授权域名</td>
                    <td th:text="${auth_domain}"></td>
                </tr>
                <tr>
                    <td>到期时间</td>
                    <td th:text="${auth_end_time}"></td>
                </tr>
                <tr>
                    <td>授权商</td>
                    <td th:text="${auth_main}"></td>
                </tr>
                <tr>
                    <td>服务器IP地址</td>
                    <td th:text="${ip}"></td>
                </tr>
                <tr>
                    <td>服务器主机名</td>
                    <td th:text="${hostname}"></td>
                </tr>
                <tr>
                    <td>操作系统</td>
                    <td th:text="${osname}"></td>
                </tr>
                <tr>
                    <td>操作系统版本</td>
                    <td th:text="${osversion}"></td>
                </tr>
                <tr>
                    <td>Web&nbsp;Root</td>
                    <td th:text="${realpath}"></td>
                </tr>
                <tr>
                    <td>运行环境版本</td>
                    <td th:text="${javaversion}"></td>
                </tr>
                <tr>
                    <td>运行环境供应商</td>
                    <td th:text="${javavendor}"></td>
                </tr>
                <tr>
                    <td>虚拟实现名称</td>
                    <td th:text="${javavmname}"></td>
                </tr>
                <tr>
                    <td>虚拟机内存</td>
                    <td th:text="${maxmemory}+'M'"></td>
                </tr>
                <tr>
                    <td>已使用内存</td>
                    <td th:text="${usememory}+'M'"></td>
                </tr>
                <tr>
                    <td>空闲内存</td>
                    <td th:text="${freememory}+'M'"></td>
                </tr>
                </tbody>
            </table>
        </div>
    </fieldset>
</div>
</body>
<script>
    function member_del(obj, id) {
        layer.confirm('系统将删除48小时前所有订单,确认要继续吗？', function (index) {
            $.post("/admin/order/old_clear",
                {"id": id},
                function (data) {
                    if (data.code == 0) {
                        layer.msg(data.msg, {icon: 1, time: 800});
                        setTimeout(function () {
                            reload_iframe();
                        }, 800);
                    } else {
                        layer.msg(data.msg, {icon: 2, time: 800});
                    }
                }, "json");
        });
    }

    function reload_iframe() {
        location.replace(location.href);
    }

</script>
</html>